<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
	<form id="form1" name="form1" method="post" action="/member/login.html">
		<fieldset>
			<table summary="회원로그인양식">
				<tbody>
					<tr>
						<th scope="row" align="left">
							아이디(이메일)
						</th>
						<td>
							<input type="text" id="id" name="id" />
						</td>
					</tr>
					<tr>
						<th scope="row" align="left">
							비밀번호
						</th>
						<td>
							<input type="password" name="password" id="password"/>
						</td>				
					</tr>
				</tbody>
			</table>
		</fieldset>
	</form>
	<div>
		<button onclick="login();" style="font-size:12px;font-family: Malgun Gothic,Gulim;padding:0;margin:0">확인</button>
		<button onclick="cancel();" style="font-size:12px;font-family: Malgun Gothic,Gulim;padding:0;margin:0">취소</button>
	</div>
<script type="text/javascript">
	var form1 = document.form1;
	
	var checkValue = function(){
		if(form1.id.value == null || form1.id.value == ''){ 
			alert("이름을 입력하세요"); 
			return false;
		}
		else if(form1.password.value == null || form1.password.value == ''){
			alert("비밀번호를 입력하세요"); 
			return false;
		}
		else return true
	}
	var login = function(){
		if(checkValue() == true) form1.submit();
	}
	
	var cancel = function(){
		location.href = "/main.html"; 
		location.replace("/main.html"); 
	}
</script>
